package com.wa.api

import com.wa.pojo.VmInfo
import com.wa.service.VmInfoService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/hello")
class HelloController {

    @Autowired
    lateinit var vmInfoService: VmInfoService

    @RequestMapping("/get")
    fun helloKotlin(): List<VmInfo> {
        var vmInfo: List<VmInfo> = vmInfoService.selectAll();
        return vmInfo
    }
}